<template>
    <div class="index-store-list">

        <div class="store-item" v-for="item in storeList" :key="item.name">
            <Store :store="item" :hasCategoryPath="hasCategoryPath"></Store>
        </div>
    </div>
</template>

<script>
import Store from './Store.vue'

export default {
    props: ['storeList'],
    components: {
        Store
    },
    computed:{
        hasCategoryPath: function(){
            
            return this.$route.path.indexOf('categoryDetail') != -1
        }
    },
}
</script>

<style scoped>
.index-store-list {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.store-item {
    margin-top: 20px;

    width: 90%;

    padding: 5px;

    background-color: white;

    border-radius: 8px;
}
</style>